// 后端API配置文件

// 修改为你的后端服务IP地址或域名
export const BASE_URL = 'http://192.168.1.100:8080/api';

// 认证相关API
export const AUTH_API = {
  LOGIN: `${BASE_URL}/auth/login`,
  VALIDATE: `${BASE_URL}/auth/validate`
};

// 电商相关API
export const ECOMMERCE_API = {
  PRODUCTS: `${BASE_URL}/ecommerce/products`,
  PRODUCT_SEARCH: `${BASE_URL}/ecommerce/products/search`,
  ORDERS: `${BASE_URL}/ecommerce/orders`,
  ORDER_BY_ID: (id) => `${BASE_URL}/ecommerce/orders/${id}`
};

// 客服相关API
export const CUSTOMER_SERVICE_API = {
  CHAT: `${BASE_URL}/customer-service/chat`,
  CLEAR_HISTORY: `${BASE_URL}/customer-service/chat/history`,
  PRODUCT_INFO: (id) => `${BASE_URL}/customer-service/product-info/${id}`,
  ORDER_STATUS: (id) => `${BASE_URL}/customer-service/order-status/${id}`
};

// 请求超时设置（毫秒）
export const REQUEST_TIMEOUT = 30000;

// 重试配置
export const RETRY_CONFIG = {
  MAX_RETRIES: 3,
  RETRY_DELAY: 1000
};